package cn.itcast.zt.java8.model.state;

import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * create by zhangtian105 on 2021/9/15
 */
@Component(OrderStateFactory.ORDER_STATUS + 3)
public class OrderStateFor3 extends OrderStateCommon{
    @Override
    public void handle(Order newOrder, Order oldOrder) {
        if (Objects.isNull(oldOrder)){
            System.out.println("不做操作");
        }

        System.out.println("订单状态:3 处理逻辑==>");

        //保存日志
        super.buildOrderLog(newOrder);
    }
}
